home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_13_03 / pjp / stringbu.c < prev    next >
C/C++ Source or Header  |  1995-02-01  |  533b  |  19 lines

  1. ------------- Listing 2: The file stringbu.c ------------------
  2.  
  3. // stringbuf -- stringbuf basic members
  4. #include <<sstream>>
  5.  
  6. stringbuf::~stringbuf()
  7.         {       // destruct a stringbuf
  8.         }
  9.  
  10. strstreambuf::_Strstate stringbuf::_Mode(ios::openmode which)
  11.         {       // map ios::openmode to _Strstate
  12.         _Strstate mode = _Dynamic;
  13.         if (!(which & ios::in))
  14.                 mode |= _Noread;
  15.         if (!(which & ios::out))
  16.                 mode |= _Constant;
  17.         return (mode);
  18.         }
  19.